package com.apes.project.jekunAuto.purchase.model;

import com.apes.framework.jpa.generator.ApesGenerator;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * 功能：测试单表继承
 *
 * @author xul
 * @create 2018-03-03 15:16
 */
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@Table(name = "t_test")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class Test {

    public static final String CONST_TABLE_NAME = "t_test";

    @Id
    @Column(name = "id")
    @ApesGenerator(code = CONST_TABLE_NAME, name = "测试单表继承")
    private long id;

}
